Making of a blog

2021-01-21 12:21:06

For nearly two years, I wanted to make a blog about my experience in informatics. As a Belgian student, I find that experience is more unique than others. For example, Amazon AWS is expensive and not in my student budget. Nevertheless, this restriction doesn't have to be a bad thing. You do more things yourself and don't rely on expensive tools. You learn to set up your node-server with an express framework. An own server gives more control than an AWS Lambda, but can be set up with a few clicks and has less work.

Why no JS?

The reason why I kept stalling the blog was due to the need for a platform to post on. WordPress and other content management systems are a great option. But for a simple blog, they are too much! I wanted something more optimized: less CSS, PHP and JS. Just the barebones of a blog-site and entirely controlable by myself. It became clear that the best option had to write that platform myself.

Naturally, the first problem I encountered like every programmer when starting a new project was choosing the right program language. I first looked to React js, but soon I wanted something a bit more small/static. JS files are huge with React and negatively impact the speed of a page. Also the site should be viewable without JS. Many people still surf on outdated browsers such as Internet Explorer, like both my sisters.

Then I learned of Next.js. It is a great framework but still has the downside of JS. Second, it had a steeper learning curve, which I didn't like for such a small project. A worse problem where the upgrades. When installing a new update of a npm package, it regulary comes with breaking changes.

The programming

I settled on C++ with crow framework. Despite c++, the framework is easy in use and strongly resembles Flask. The benefits of this framework are:

  • Low resources usage.
  • Fast response time
  • High throughput
  • upgrades less frequent and breaks less code

The only downside is that linking libraries can be difficult, especially on non-Linux systems.